<template>
	<view class="content">
		<view style="">
			<!-- getApp().globalData.iconUrl = result.userInfo.avatarUrl;
			getApp().globalData.UserInfo_gender = result.userInfo.gender;
			getApp().globalData.UserInfo_nickname = result.userInfo.nickName; -->
			<view style="background-color:#FFFFFF;height: 50px;"></view>
			<view class="userinfo">
				<view class="cu-avatar round lg " :style="[{ backgroundImage:'url(' + user.iconUrl + ')' }]" style="top: -55upx;">
					
					<view class="cu-tag badge" :class="user.sex==2?'cuIcon-female bg-pink':'cuIcon-male bg-blue'"></view>
					<!-- 
					cuIcon-female bg-pink 女
					 cuIcon-male bg-blue 男
					 -->
					 <view style="margin-top: 210rpx;">
						 <text>{{user.nickname}}</text>
					 </view>
				</view>
			</view>
		</view>
		<view class="cu-list menu" :class="[menuBorder?'sm-border':'',menuCard?'card-menu margin-top':'']">
			<view class="cu-item" :class="menuArrow?'arrow':''" style="margin-bottom: 20upx;">
				<view class="content">
					<text class="cuIcon-choiceness text-grey"></text>
					<text class="text-black text-w">学号</text>
				</view>
			</view>
			<view class="cu-item" :class="menuArrow?'arrow':''">
				<view class="content">
					<text class="cuIcon-coin text-olive"></text>
					<text class="text-black text-w">钱包</text>
				</view>
			</view>
			<view @click.native="toTranscript" class="cu-item" :class="menuArrow?'arrow':''">
				<button class="cu-btn content" open-type="contact">
					<text class="cuIcon-btn text-olive"></text>
					<text class="text-black text-w">我的帖子</text>
				</button>
			</view>
			<view class="cu-item" :class="menuArrow?'arrow':''">
				<navigator class="content" hover-class="none" url="../list/list" open-type="redirect">
					<text class="cuIcon-selectionfill text-orange"></text>
					<text class="text-black text-w">信息认证</text>
				</navigator>
			</view>
			<view class="cu-item" :class="menuArrow?'arrow':''">
				<navigator class="content" hover-class="none" url="../list/list" open-type="redirect">
					<text class="cuIcon-appreciatefill text-orange"></text>
					<text class="text-black text-w">校友邀请</text>
				</navigator>
			</view>
			
			<view class="cu-item" :class="menuArrow?'arrow':''">
				<navigator class="content" hover-class="none" url="../list/list" open-type="redirect">
					<text class="cuIcon-appreciatefill text-orange"></text>
					<text class="text-black text-w">手机号</text>
				</navigator>
			</view>
			
			<view class="cu-item" :class="menuArrow?'arrow':''">
				<navigator class="content" hover-class="none" url="../list/list" open-type="redirect">
					<text class="cuIcon-appreciatefill text-orange"></text>
					<text class="text-black text-w">专业</text>
				</navigator>
			</view>
			
			<view @click.native="toSetting" class="cu-item" :class="menuArrow?'arrow':''" style="margin-top: 20upx;margin-bottom: 20upx;">
				<navigator class="content" hover-class="none" url="../list/list" open-type="redirect">
					<text class="cuIcon-creativefill text-orange"></text>
					<text class="text-black text-w">功能建议</text>
				</navigator>
			</view>
			
		
		</view>
	</view>
</template>

<script>
	
	export default {
		data() {
			return {
					user:{
						nickname:'',
						iconUrl:'',
						sex:''
					}
			};
		},
		onLoad:function(){
			let that = this;
			uni.getStorage({
				key:'user',
				success:function(result){
					that.user = result.data;
					//console.info(that.user);
				}
			})
		},
		methods:{
		}
	}
</script>


<style scoped lang="scss">
.userinfo {
	background: #0081FF;
	//圆角边框
	border-top-left-radius: 15px;
	border-top-right-radius: 15px;
	position: relative;
	top: -20px;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	//背景高度
	height: 80px;
	color: #666;
	font-size: 16px;
	&-img {
		position: absolute;
		top: -30px;
		margin-bottom: 50px;
		width: 80px;
		height: 80px;
		border: 1px solid #ccc;
		background-color: #fff;
		border-radius: 100px;
	}
	&-text{
		top: -20upx;
	}
}
</style>
